package com.csdj.controller;

import com.csdj.common.utils.ResponseResult;
import com.csdj.service.WorkSpaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;

/**
 * @author 涵哥
 * @date 2023-08-30 15:54
 *  我的工作空间
 */
@RestController
@RequestMapping("/workspace")
public class WorkSpaceController {

    @Autowired
    private WorkSpaceService workSpaceService;

    @GetMapping("/loadDateForThisMonth")
    public ResponseResult loadDateForThisMonth(){
        return workSpaceService.loadDateForThisMonth();
    }

    @PostMapping("/loadReceivableData")
    public ResponseResult loadReceivableData(@RequestBody ArrayList<String> list){
        return workSpaceService.loadReceivableData(list);
    }

    @GetMapping("/loadPieChartData")
    public ResponseResult loadPieChartData(){
        return workSpaceService.loadPieChartData();
    }
}
